import java.util.Scanner;
//递归求 N 的阶乘
public class Factorial {
    public static int fac(int n) {
        if(n == 1) {
            return 1;
        } else {
            return (n * fac(n - 1));
        }
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(fac(n));
    }
}
